<template>
  <div class="child-page">
    <div> 儿子组件1 拥有书：{{ books }}</div>
  </div>
</template>
<script setup lang="ts" name="refAndParentChild1">
import { ref,defineExpose } from 'vue';
const books = ref(5);

defineExpose({books})

</script>
<style  scoped>
.child-page{
  padding: 20px 50px;
  background: green;
  color: #fff;
}
</style>
